# 实战三： 使用oop进行乐器演奏 多态 不用继承 只关心同名方法
class Insteument:
    def make_sound(self):
        print('乐器在演奏')

class Erhu(Insteument):
    def make_sound(self):
        print('二胡在演奏')

class Piano(Insteument):
    def make_sound(self):
        print('钢琴在演奏')


def play(obj):
    obj.make_sound()

i = Insteument()
e = Erhu()
p = Piano()

play(i)
play(e)
play(p)

